package com.aop;

import com.loopdependencybean.Bean1;
import com.loopdependencybean.Bean2;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;

@Aspect
@Slf4j
public class DynamicAspectJConfig {

    @Before("execution( public void com.service.impl.UserServiceImpl.updateBean(..)) && args(bean1,bean2)")
    public void readParams(Bean1 bean1, Bean2 bean2){
        log.info("前置通知读取被代理方法的参数bean1 = {},bean2={}",bean1,bean2);
    }
}
